from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()
from django.views.generic.simple import direct_to_template
import settings

urlpatterns = patterns('',
    (r'^$', 'Exam.views.exam_list'),
    (r'^exams/?$', 'Exam.views.exam_list'),
    (r'^view/(\d+)/?$', 'Exam.views.view_exam'),
    (r'^create/?$', 'Exam.views.create_exam'),
    (r'^delete/(\d+)/?$', 'Exam.views.delete_exam'),
    (r'^grades/?$', 'Exam.views.calc_grades'),


    (r'^accounts/login/$','django.contrib.auth.views.login'),
    (r'^accounts/logout/$','Exam.views.logout_view'),


    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),



    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),


)
